﻿<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="SiteStructureVerificationPlugin.aspx.cs" Inherits="EPiCloner.Templates.Plugins.Cloning.SiteStructureVerificationPlugin" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.ComponentModel" %>
<%@ Import Namespace="EPiServer.Core" %>
<%@ Register TagPrefix="epi" Assembly="EPiServer" Namespace="EPiServer.Web.WebControls" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Site Structure Verification</title>
        <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/App_Themes/Default/styles/system.css") %>"/>
        <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("~/App_Themes/Default/styles/ToolButton.css") %>" />
        <link rel="stylesheet" type="text/css" href="<%=ResolveUrl("/css/framework.css") %>" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="actionWindowBox">
    <h3>Site Structure Verification</h3>
    <table class="epi-formLayout" cellspacing="0" style="display:block;">
       <tbody>
		<tr id="PageToVerifyRow">
			<th class="EP-tableCaptionCell"><span>Root page to verify</span></th>
			<td><div class="EP-requiredField">
				<epi:InputPageReference runat="server" id="pageToVerify" />
			</div></td>
		</tr>
        <tr>
        <td>
            <asp:Button ID="btnValidateStructure" Text="Validate structure" OnClick="BtnValidateStructureClicked" runat="server" />
        </td>
            <td></td>
        </tr>
       </tbody>
     </table>
     <asp:Repeater id="rptNotValidItems" runat="server">
         <HeaderTemplate>
             <table class="epi-default">
                 <tbody>
                     <tr>
                         <th>Parent PageType Name</th>
                         <th>Child Page Type Name</th>
                         <th>Parent Page Id</th>
                         <th>Child Page Id</th>
                     </tr>
         </HeaderTemplate>
         <ItemTemplate>
             <tr>
                 <td width="40%"><%# ((KeyValuePair<PageData, PageData>)Container.DataItem).Key.PageTypeName %></td>
                 <td width="40%"><%# ((KeyValuePair<PageData, PageData>)Container.DataItem).Value.PageTypeName %></td>
                 <td width="10%"><%# ((KeyValuePair<PageData, PageData>)Container.DataItem).Value.PageLink %></td>
                 <td width="10%"><%# ((KeyValuePair<PageData, PageData>)Container.DataItem).Key.PageLink %></td>
             </tr>
         </ItemTemplate>
         <FooterTemplate>
                </tbody>
             </table>
         </FooterTemplate>
     </asp:Repeater>
     <table></table>
     <div class="resultInfo">
        <strong><asp:Literal ID="litResults" runat="server"></asp:Literal></strong>
    </div>
    </div>
<script type="text/javascript" src="<%= EPiServer.UriSupport.ResolveUrlFromUtilBySettings("javascript/episerverscriptmanager.js") %>"></script>
<script type="text/javascript" src="<%= EPiServer.UriSupport.ResolveUrlFromUIBySettings("javascript/system.js") %>"></script>
<script type="text/javascript" src="<%= EPiServer.UriSupport.ResolveUrlFromUIBySettings("javascript/system.aspx") %>"></script>
    </form>
</body>
</html>
